
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>第五章：副本 · DDIA（ZH-CN）</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="马以">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="chapter6.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Preface.html">
            
                <a href="../Preface.html">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../part1/">
            
                <a href="../part1/">
            
                    
                    第一部分：数据系统基本原理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../part1/chapter1.html">
            
                <a href="../part1/chapter1.html">
            
                    
                    第一章：可靠、可伸缩以及易维护系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../part1/chapter2.html">
            
                <a href="../part1/chapter2.html">
            
                    
                    第二章：数据模型与查询语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../part1/chapter3.html">
            
                <a href="../part1/chapter3.html">
            
                    
                    第三章：存储与检索
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../part1/chapter4.html">
            
                <a href="../part1/chapter4.html">
            
                    
                    第四章：编码及演进
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    第二部分：分布式数据
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.1" data-path="chapter5.html">
            
                <a href="chapter5.html">
            
                    
                    第五章：副本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="chapter6.html">
            
                <a href="chapter6.html">
            
                    
                    第六章：分区
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="chapter7.html">
            
                <a href="chapter7.html">
            
                    
                    第七章：事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="chapter8.html">
            
                <a href="chapter8.html">
            
                    
                    第八章：分布式系统面临的的问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="chapter9.html">
            
                <a href="chapter9.html">
            
                    
                    第九章：一致性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../part3/">
            
                <a href="../part3/">
            
                    
                    第三部分：数据加工
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../part3/chapter10.html">
            
                <a href="../part3/chapter10.html">
            
                    
                    第十章：批处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../part3/chapter11.html">
            
                <a href="../part3/chapter11.html">
            
                    
                    第十一章：流处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../part3/chapter12.html">
            
                <a href="../part3/chapter12.html">
            
                    
                    第十二章：数据系统前景
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Glossary.html">
            
                <a href="../Glossary.html">
            
                    
                    术语表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Indexs.html">
            
                <a href="../Indexs.html">
            
                    
                    索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../about_the_author.html">
            
                <a href="../about_the_author.html">
            
                    
                    关于作者
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >第五章：副本</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p><img src="../img/chapter5.png" alt="ch5"></p>
<h1 id="&#x7B2C;&#x4E94;&#x7AE0;&#xFF1A;&#x526F;&#x672C;">&#x7B2C;&#x4E94;&#x7AE0;&#xFF1A;&#x526F;&#x672C;</h1>
<blockquote>
<p>&#x4E00;&#x4EF6;&#x4E8B;&#x60C5;&#x51FA;&#x9519;&#x548C;&#x4E0D;&#x51FA;&#x9519;&#x6700;&#x5927;&#x7684;&#x533A;&#x522B;&#x5728;&#x4E8E;&#x5F53;&#x4E00;&#x4EF6;&#x4E0D;&#x53EF;&#x80FD;&#x51FA;&#x9519;&#x7684;&#x4E8B;&#x60C5;&#x51FA;&#x9519;&#x65F6;&#xFF0C;&#x901A;&#x5E38;&#x5DF2;&#x7ECF;&#x96BE;&#x4EE5;&#x633D;&#x6551;&#x4E86;&#x3002;</p>
<p>&#x2014; Douglas Adams, <em>Mostly Harmless</em> (1992)</p>
</blockquote>
<h2 id="&#x9886;&#x5BFC;&#x8005;&#x548C;&#x8FFD;&#x968F;&#x8005;">&#x9886;&#x5BFC;&#x8005;&#x548C;&#x8FFD;&#x968F;&#x8005;</h2>
<h3 id="&#x540C;&#x6B65;&#x590D;&#x5236;&#x4E0E;&#x5F02;&#x6B65;&#x590D;&#x5236;">&#x540C;&#x6B65;&#x590D;&#x5236;&#x4E0E;&#x5F02;&#x6B65;&#x590D;&#x5236;</h3>
<h3 id="&#x589E;&#x52A0;&#x65B0;&#x7684;&#x8FFD;&#x968F;&#x8005;">&#x589E;&#x52A0;&#x65B0;&#x7684;&#x8FFD;&#x968F;&#x8005;</h3>
<h3 id="&#x5904;&#x7406;&#x8282;&#x70B9;&#x5F02;&#x5E38;">&#x5904;&#x7406;&#x8282;&#x70B9;&#x5F02;&#x5E38;</h3>
<h3 id="&#x540C;&#x6B65;&#x65E5;&#x5FD7;&#x5B9E;&#x73B0;">&#x540C;&#x6B65;&#x65E5;&#x5FD7;&#x5B9E;&#x73B0;</h3>
<h2 id="&#x5EF6;&#x8FDF;&#x540C;&#x6B65;&#x95EE;&#x9898;"><a id="ReplicationLag">&#x5EF6;&#x8FDF;&#x540C;&#x6B65;&#x95EE;&#x9898;</a></h2>
<h3 id="&#x8BFB;&#x5DF1;&#x5199;">&#x8BFB;&#x5DF1;&#x5199;</h3>
<h3 id="&#x5355;&#x8C03;&#x8BFB;">&#x5355;&#x8C03;&#x8BFB;</h3>
<h3 id="&#x4E00;&#x81F4;&#x6027;&#x524D;&#x7F00;&#x8BFB;">&#x4E00;&#x81F4;&#x6027;&#x524D;&#x7F00;&#x8BFB;</h3>
<h3 id="&#x540C;&#x6B65;&#x5EF6;&#x65F6;&#x89E3;&#x51B3;&#x65B9;&#x6848;">&#x540C;&#x6B65;&#x5EF6;&#x65F6;&#x89E3;&#x51B3;&#x65B9;&#x6848;</h3>
<h2 id="&#x591A;&#x4E3B;&#x590D;&#x5236;">&#x591A;&#x4E3B;&#x590D;&#x5236;</h2>
<h3 id="&#x591A;&#x4E3B;&#x590D;&#x5236;&#x7528;&#x4F8B;">&#x591A;&#x4E3B;&#x590D;&#x5236;&#x7528;&#x4F8B;</h3>
<h3 id="&#x5199;&#x51B2;&#x7A81;&#x5904;&#x7406;">&#x5199;&#x51B2;&#x7A81;&#x5904;&#x7406;</h3>
<h3 id="&#x591A;&#x9886;&#x5BFC;&#x8005;&#x526F;&#x672C;&#x62D3;&#x6251;">&#x591A;&#x9886;&#x5BFC;&#x8005;&#x526F;&#x672C;&#x62D3;&#x6251;</h3>
<h2 id="&#x65E0;&#x4E3B;&#x590D;&#x5236;">&#x65E0;&#x4E3B;&#x590D;&#x5236;</h2>
<h3 id="&#x5199;&#x65F6;&#x8282;&#x70B9;&#x6545;&#x969C;">&#x5199;&#x65F6;&#x8282;&#x70B9;&#x6545;&#x969C;</h3>
<h3 id="&#x9650;&#x5B9A;&#x6CD5;&#x5B9A;&#x6570;&#x4E00;&#x81F4;&#x6027;">&#x9650;&#x5B9A;&#x6CD5;&#x5B9A;&#x6570;&#x4E00;&#x81F4;&#x6027;</h3>
<h3 id="sloppy-quorums-and-hinted-handoff">Sloppy Quorums and Hinted Handoff</h3>
<h2 id="&#x5E76;&#x53D1;&#x5199;&#x5165;&#x68C0;&#x6D4B;"><a id="detectiongConcurrentWrites">&#x5E76;&#x53D1;&#x5199;&#x5165;&#x68C0;&#x6D4B;</a></h2>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 第二部分：分布式数据">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="chapter6.html" class="navigation navigation-next " aria-label="Next page: 第六章：分区">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第五章：副本","level":"1.4.1","depth":2,"next":{"title":"第六章：分区","level":"1.4.2","depth":2,"path":"part2/chapter6.md","ref":"part2/chapter6.md","articles":[]},"previous":{"title":"第二部分：分布式数据","level":"1.4","depth":1,"path":"part2/README.md","ref":"part2/README.md","articles":[{"title":"第五章：副本","level":"1.4.1","depth":2,"path":"part2/chapter5.md","ref":"part2/chapter5.md","articles":[]},{"title":"第六章：分区","level":"1.4.2","depth":2,"path":"part2/chapter6.md","ref":"part2/chapter6.md","articles":[]},{"title":"第七章：事务","level":"1.4.3","depth":2,"path":"part2/chapter7.md","ref":"part2/chapter7.md","articles":[]},{"title":"第八章：分布式系统面临的的问题","level":"1.4.4","depth":2,"path":"part2/chapter8.md","ref":"part2/chapter8.md","articles":[]},{"title":"第九章：一致性","level":"1.4.5","depth":2,"path":"part2/chapter9.md","ref":"part2/chapter9.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["github","expandable-chapters","back-to-top-button","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"github":{"url":"https://github.com/gxstax"},"livereload":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"马以","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"DDIA（ZH-CN）","language":"zh-hans","gitbook":"*","description":"DDIA中文翻译"},"file":{"path":"part2/chapter5.md","mtime":"2023-08-04T04:54:38.750Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-08-04T11:30:49.479Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

